package com.csx.governance.traffic.adm.model.dto;

import com.csx.governance.traffic.adm.model.pojo.SwimLaneSubDefinition;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 泳道定义业务实体
 * @author cuisongxu
 * @date 2023/4/23 16:27
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
public class SwimLaneDefinitionDTO {

    @Schema(description = "泳道ID")
    private String swimLaneId;

    @Schema(description = "是否为基线; true表示是; false表示否")
    private Boolean isBaseSwimLane;

    @Schema(description = "基线泳道ID")
    private String baseSwimLaneId;

    @Schema(description = "泳道子定义列表")
    private List<SwimLaneSubDefinition> swimLaneSubDefinitions;

    public String getBaseSwimLaneId() {
        if(baseSwimLaneId == null) {
            return "";
        }
        return baseSwimLaneId;
    }

    public Boolean getIsBaseSwimLane() {
        if(isBaseSwimLane == null) {
            return false;
        }
        return isBaseSwimLane;
    }
}
